//
//  WMPlatformTool.h
//  WonderMobSDK
//
//  Created by zero on 2020/6/22.
//

#import <Foundation/Foundation.h>

#import "WMDefines.h"

NS_ASSUME_NONNULL_BEGIN

@class WMPlan, WMPlans, WMAdId;

typedef void(^WMPreloadAdBlock)(void);

@interface WMPlatformTool : NSObject

/// 后台配置
@property (nonatomic, readonly, strong) WMPlans *plans;

/// 本地配置
@property (nonatomic, readonly, strong) NSMutableArray<WMPlan *> *localAds;


/// 初始化
/// @param adModel adModel
- (instancetype)initWithAdIdModel:(WMAdId *)adModel
                            posId:(NSString *)posId
                      preloaBlock:(WMPreloadAdBlock)block;

/// 当前时间 ms
+ (NSUInteger)now;


/// 判断是否有网络
- (BOOL)isNetworkStateValid;

/// 判断是否有网络，没有则弹出 toast
- (BOOL)judgeNetworkValid;

@end

NS_ASSUME_NONNULL_END
